<%@page contentType="text/html;charset=UTF-8" language = "java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<html>
<head>
	<title>新建词条 | JWiki</title>
	<link rel="stylesheet" href="texts/style.css" type="text/css" />
	<script type="text/javascript" src="texts/nanoWIME.js"></script>
		<script type="text/javascript">
		/* <![CDATA[ */
		nanoWIME._init({
			// General options
			elementID : "wiki-editor",
			buttonBar1 : "h1,h2,h3,h4,h5,h6,|,ulist,olist,|,bold,italic,underline,strikethrough,sup,sub,nowiki,|,link_intern,link_extern",
			buttonsConf : {
				simple_ref : {
				title : 'Simple reference [s]',
				img : 'book_link.png',
				cssclass : 'button',
				align : 'middle',
				elementId : 'toolbar_btn_simpleref',
				on_mouseover : function() {
				this.className = 'raised';
				},
				on_mouseout : function() {
				this.className = 'button';
				},
				on_mousedown : function() {
				this.className = 'pressed'; 
				},
				on_mouseup : function() { 
				this.className = 'raised'; 
				},
				on_click : function() {
				var refName = prompt("Name of the reference:", "");
				var groupName = prompt("Name of thre group the reference belongs to:", "");
				var inString = "<ref";
				if (refName != '') {
					inString += ' name="' + refName + '"';
				} // if ENDE
				if (groupName != '') {
					inString += ' group="' + groupName + '"';
				} // if ENDE
				inString += '>';
				nanoWIME._getReplaceText(inString, '</ref>');
				},
				shortcut : 's'
			},
				ref_listing : {
				title : 'Reference listing [r]',
				img : 'table_link.png',
				cssclass : 'button',
				align : 'middle',
				elementId : 'toolbar_btn_reflisting',
				on_mouseover : function() {
				this.className = 'raised';
				},
				on_mouseout : function() {
				this.className = 'button';
				},
				on_mousedown : function() {
				this.className = 'pressed'; 
				},
				on_mouseup : function() { 
				this.className = 'raised'; 
				},
				on_click : function() {
				var groupName = prompt("Name of the group which will be listed:", "");
				var inString = '<references';
				if (groupName != '') {
					inString += ' group="' + groupName + '"';
				} // if ENDE
				inString += ' />';
				nanoWIME._getReplaceText(inString, '');
				},
				shortcut : 'r'
			}
			}
		});
		/* ]]> */
		</script>
</head>
<body>
	<div id="page-wrapper">
		<c:import url="header.jsp"/>
		<c:import url="sidebar.jsp"/>		
		<div id="content">
			<c:import url="s_navs.jsp"/>	
			<h2>请编辑词条内容：</h2>
			<c:if test="${param.error == 1}">
				<p><font color = red>错误</font></p>
			</c:if>
			<form action = "additem.do" method = "post" ENCTYPE = "multipart/form-data">
			<div id="edit">
				<p>词条名：
				<input type = "text" name = "title" id="filename" size = "20" value="<c:out value="${keyword}" />"/>
				</p>
				<p>请选择页面的类型:</p>
				<p><select name = "type" size="1"> 
							<option value = "1" > 目录 </option>
							<option value = "2" selected> 词条 </option>
				</select></p>
				<p>请在如下内容编辑</p>
				<textarea name="content" rows="30" cols="80" id="wiki-editor"></textarea>
				<br />
				<input type = "submit" value = "提交"/>
				<p>请使用如下的Wiki语法：</p>
				<table><tbody><tr class="evn"><td> <strong>Wiki Markup</strong> </td><td> <strong>HTML</strong> </td></tr>
<tr class="odd"><td colspan="2"> <em>Block Formatting</em> </td></tr>
<tr class="odd"><td class="lft"><code>paragraphs separated</code><br>
 <br>
<code>by an empty line </code> </td><td class="lft"><code>&lt;p&gt;paragraphs separated&lt;/p&gt;</code><br>
<code>&lt;p&gt;by an empty line&lt;/p&gt;</code> </td></tr>
<tr class="evn"><td class="lft"><code>line break by two\\ </code><br>
<code>slashes followed by a space or newline</code> </td><td class="lft"><code>line break by two&lt;br/&gt;</code><br>
<code>slashes followed by a space or newline</code> </td></tr>
<tr class="odd"><td class="lft"><code>["quotation"]</code> </td><td class="lft"><code>&lt;blockquote&gt;&lt;p&gt;quote&lt;/p&gt;&lt;/blockquote&gt;</code> </td></tr>
<tr class="evn"><td class="lft"><code>[%code block</code>%] </td><td class="lft"><code>&lt;pre&gt;code block&lt;/pre&gt;</code> </td></tr>
<tr class="odd"><td colspan="2"> <em>Inline Formatting</em> </td></tr>
<tr class="evn"><td class="lft"><code>*strong*</code> </td><td class="lft"><code>&lt;strong&gt;strong&lt;/strong&gt;</code> </td></tr>
<tr class="odd"><td class="lft"><code>_emphasized_</code> </td><td class="lft"><code>&lt;em&gt;emphasized&lt;/em&gt;</code> </td></tr>
<tr class="evn"><td class="lft"><code>^superscript^</code> </td><td class="lft"><code>&lt;sup&gt;superscript&lt;/sup&gt;</code> </td></tr>
<tr class="odd"><td class="lft"><code>~subscript~</code> </td><td class="lft"><code>&lt;sub&gt;subscript&lt;/sub&gt;</code> </td></tr>
<tr class="evn"><td class="lft"><code>%code%</code> </td><td class="lft"><code>&lt;code&gt;code&lt;/code&gt;</code> </td></tr>
<tr class="odd"><td class="lft"><code>?ABBR(abbreviation)?</code> </td><td class="lft"><code>&lt;abbr title="abbreviation"&gt;ABBR&lt;/abbr&gt;</code> </td></tr>
<tr class="evn"><td colspan="2"> <em>Links &amp; Images</em> </td></tr>
<tr class="odd"><td class="lft"><code>http://u.ri</code> </td><td class="lft"><code>&lt;a href="http://u.ri"&gt;http://u.ri&lt;/a&gt;</code> </td></tr>
<tr class="evn"><td class="lft"><code>[http://u.ri, title]</code> </td><td class="lft"><code>&lt;a href="http://u.ri"&gt;title&lt;/a&gt;</code> </td></tr>
<tr class="odd"><td class="lft"><code>uri/image.png</code> </td><td class="lft"><code>&lt;img src="uri/image.png" alt="uri/image.png"/&gt;</code> </td></tr>
<tr class="evn"><td class="lft"><code>[img:uri/image.png,title]</code> </td><td class="lft"><code>&lt;a href="http://u.ri"&gt;title&lt;/a&gt;</code> </td></tr>
<tr class="odd"><td class="lft"><code>[http://u.ri, title]</code> </td><td class="lft"><code>&lt;img src="uri/image.png" alt="title" title="title"/&gt;</code> </td></tr>
<tr class="evn"><td colspan="2"> <em>Lists</em> </td></tr>
<tr class="odd"><td class="lft"><code>; term: definition</code> </td><td class="lft"><code>&lt;dl&gt;&lt;dt&gt;term&lt;/dt&gt;&lt;dd&gt;definition&lt;/dd&gt;&lt;/dl&gt;</code> </td></tr>
<tr class="evn"><td colspan="2"> <em>Table</em> </td></tr>
<tr class="odd"><td class="lft"><code>[|one|two|</code><br>
<code> ||three|four|]</code> </td><td class="lft"><code>&lt;table&gt;&lt;tr&gt;&lt;td&gt;one&lt;/td&gt;&lt;td&gt;two&lt;/td&gt;&lt;/tr&gt;</code><br>
<code>&lt;tr&gt;&lt;td&gt;three&lt;/td&gt;&lt;td&gt;four&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</code> </td></tr></tbody></table>
			</div>
			</form>
		</div>
		<c:import url="footer.jsp"/>
	</div>	
</body>
</html>